#include<stdio.h>
int main(void)
{
    int n1=0;
    int n2=0;
    int n3=0;
    printf("请输入一串字符");
    while(1)
    {
        char ch;
        ch=getchar();
        if(ch=='\n')
            break;
        else if(ch==' ')
            n1++;
        else if(ch>='a'&&ch<='z'||ch>='A'&&ch<='Z')
            n2++;
        else
            n3++;
    }
    printf("字母的个数为%d\n",n2);
    printf("空格的个数为%d\n",n1);
    printf("其他字符的个数为%d\n",n3);
    return 0;
}